﻿using MyX.Core;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MyX.Work
{
    public class XExceptionStatus:XIMessageStatus
    {


        public XExceptionStatus(Guid messageID, string result, Exception exception)
        {
            ID = Guid.NewGuid();
            TimeStamp = DateTime.Now;

            XMessageID = messageID;
            Result = result;

            Exception = exception;
        }

        /// <summary>
        /// ID
        /// </summary>
        public Guid ID { get; set; }

        /// <summary>
        /// 消息ID
        /// </summary>
        public Guid XMessageID { get; set; }

        /// <summary>
        /// 处理完成时间戳
        /// </summary>
        public DateTime TimeStamp { get; set; }

        /// <summary>
        /// 处理结果描述
        /// </summary>
        public string Result { get; set; }

        /// <summary>
        /// 处理过程中发生的异常
        /// </summary>
        public Exception Exception { get; set; }

    }
}
